/**********************************************************************************************************************
 *
 * Project:    mGameEngine
 * File:       map.h
 * Author:     karooolek
 * Created on: 2008-12-30
 *
 **********************************************************************************************************************/

#ifndef MAP_H_
#define MAP_H_

#include "types.h"
#include <map>

namespace mGameEngine
{

/**
 * Map container.
 * Elements in map are ordered using keys.
 * They can be accessed using iterators or keys.
 * Keys are not duplicated.
 */
template<typename TKey, typename TVal>
class Map : public std::map<TKey, TVal>
{
public:
    /**
     * Map iterator.
     */
    typedef typename std::map<TKey, TVal>::iterator Iterator;

    /**
     * Map const iterator.
     */
    typedef typename std::map<TKey, TVal>::const_iterator ConstIterator;

    /**
     * Create empty map.
     */
    Map() : std::map<TKey, TVal>()
    {
    }

    /**
     * Copy contructor.
     * @param m Map to copy
     */
    Map(const Map &m) : std::map<TKey, TVal>(m)
    {
    }
};

}

#endif // MAP_H_
